﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="EditPwd.aspx.cs" Inherits="Users_EditPwd" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
     <asp:PlaceHolder Visible="false" runat="server">
         <script src="../Script/jquery-1.3.2-vsdoc2.js" type="text/javascript"></script>
    </asp:PlaceHolder>
    <%=this.UI_Head() %>        
    <link rel="stylesheet" type="text/css" href="../Css/Users.css" />
    <script src="../Script/formValidator/jquery_last.js" type="text/javascript"></script>
    <link href="../Script/formValidator/style/validator.css" rel="stylesheet" type="text/css" />
    <script src="../Script/formValidator/formValidator.js" type="text/javascript"></script>
    <script src="../Script/formValidator/formValidatorRegex.js" type="text/javascript"></script>
    <script type="text/javascript">
        $(document).ready(function() {
            $.formValidator.initConfig({ alertmessage: false, formid: "FormCheck", onerror: function(msg) { alert(msg) } });
            $("#Txt_OldPwd").formValidator({ onshow: "请输入旧密码", onfocus: "密码不能为空", oncorrect: "密码合法" }).inputValidator({ min: 6, max: 14, empty: { leftempty: false, rightempty: false, emptyerror: "密码两边不能有空符号" }, onerror: "密码输入出错,长度必须在6-14位,请确认" })
           .ajaxValidator({
               type: "get",
               url: "../AjaxXml/PwdConfirm.aspx",
               pre_proc: function() {
                   var v = 'OldPwd=' + escape($('#Txt_OldPwd').val()) + '&ram=' + Math.random();
                   return v;
               },
               datatype: "html",
               success: function(data) {
                   if (data == 0) {
                       return true;
                   }
                   else {
                       return false;
                   }
               },
               buttons: $("#Button1"),
               error: function() { alert("服务器没有返回数据，可能服务器忙，请重试"); },
               onerror: "旧密码输入错误,请不要尝试非法修改",
               onwait: "正在对密码进行合法性校验，请稍候..."
           });



            $("#Txt_NewPwd").formValidator({ onshow: "请输入新密码", onfocus: "密码不能为空", oncorrect: "密码合法" }).inputValidator({ min: 6, max: 14, empty: { leftempty: false, rightempty: false, emptyerror: "密码两边不能有空符号" }, onerror: "密码输入出错,长度必须在6-14位,请确认" });
            $("#Txt_ConfirmNewPwd").formValidator({ onshow: "请再次输入新密码", onfocus: "两次密码必须一致", oncorrect: "密码一致" }).inputValidator({ min: 6, max: 14, empty: { leftempty: false, rightempty: false, emptyerror: "重复密码两边不能有空符号" }, onerror: "重复密码输入出错,长度必须在6-14位,请确认" }).compareValidator({ desid: "Txt_NewPwd", operateor: "=", onerror: "二次密码不一致,请确认" });


        });   
    </script>

    <script type="text/javascript" src="../Script/province.aspx"></script>
</head>
<body>
    <%=this.UI_TopControl()%>
    <div class="topbanner bodyList">
        <div class="body_995">
            <div class="Member_left">
                <%=this.UI_Users_loginOK()%>
                <%=this.UI_UsersDhtList() %>
            </div>
            <div class="Member_Right">
                <form  runat="server" id="FormCheck" >
                <div class="Member_right_dht">
                    <img src="../Images/class_hy.jpg" /></div>
                <div class="Member_right_CntLIst">
                    <table cellpadding="0" cellspacing="0" border="0" width="100%" align="center">
                        <tr>
                            <td class="MyInfo_Aspx_Right_title" colspan="2">
                                修改密码信息
                            </td>
                        </tr>
                        <tr>
                            <td class="MyInfo_Aspx_Right_font">
                                用户名：
                            </td>
                            <td class="MyInfo_Aspx_Right_fontleft red">
                                <%=Base_GetUserInfo.UserName%>
                            </td>
                        </tr>
                        <tr>
                            <td class="MyInfo_Aspx_Right_font">
                                旧密码：
                            </td>
                            <td class="MyInfo_Aspx_Right_fontleft">
                                <div><asp:TextBox ID="Txt_OldPwd" TextMode="Password" runat="server" CssClass="RegInput"
                                    Width="141px"></asp:TextBox></div> <div id="Txt_OldPwdTip">
                                </div>
                                    
                            </td>
                        </tr>
                        <tr>
                            <td class="MyInfo_Aspx_Right_font">
                                新密码：
                            </td>
                            <td class="MyInfo_Aspx_Right_fontleft">
                                <div>
                                    <asp:TextBox TextMode="Password" ID="Txt_NewPwd" runat="server" CssClass="RegInput"
                                        Width="141px"></asp:TextBox></div>
                                <div id="Txt_NewPwdTip">
                                </div>
                            </td>
                        </tr>
                        <tr>
                            <td class="MyInfo_Aspx_Right_font">
                                确认新密码：
                            </td>
                            <td class="MyInfo_Aspx_Right_fontleft">
                                <div>
                                    <asp:TextBox TextMode="Password" ID="Txt_ConfirmNewPwd" runat="server" CssClass="RegInput"
                                        Width="141px"></asp:TextBox></div>
                                <div id="Txt_ConfirmNewPwdTip">
                                </div>
                            </td>
                        </tr>
                        <tr align="center">
                            <td height="30" colspan="2" align="left">
                                &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                                <asp:Button ID="Button1" runat="server" Text="立即修改" OnClick="Button1_Click" />
                            </td>
                        </tr>
                    </table>
                </div>
                </form>
            </div>
        </div>
        <br />
    </div>
    <%=this.UI_boot() %>
</body>
</html>
